﻿namespace Common
{
    public class Utility
    {
        #region 文章相关

        /// <summary>
        /// 文章状态
        /// </summary>
        public enum ArticleState
        {
            NoIssue = 0,//不发布
            Issue = 1,//发布
            NoRecycling = 0,//未回收
            Recycling = 1//回收
        }

        /// <summary>
        /// 获取文章类型
        /// </summary>
        /// <param name="intType">文章类型</param>
        /// <returns>标识</returns>
        public static string GetArticleType(int intType)
        {
            string strReturn = string.Empty;
            switch (intType)
            {
                case (int)ArticleType.Article:
                    strReturn = "内容";
                    break;
                case (int)ArticleType.PictureArticle:
                    strReturn = "图片文章";
                    break;
                case (int)ArticleType.Flash:
                    strReturn = "文件";
                    break;
            }

            return strReturn;
        }

        /// <summary>
        /// 获取文章状态
        /// </summary>
        /// <param name="intState">文章状态Id</param>
        /// <returns>文章状态文字</returns>
        public static string GetArticleState(int intState)
        {
            string strReturn = string.Empty;
            switch (intState)
            {
                case (int)ArticleState.NoIssue:
                    strReturn = "<font color='red'>未发布</font>";
                    break;
                case (int)ArticleState.Issue:
                    strReturn = "发布";
                    break;
            }
            return strReturn;
        }

        public enum ArticleType
        {
            Article = 1,//文章
            PictureArticle = 2,//图片
            Flash = 3,//文件
            Flv = 4,//
        }

        public enum ArticleRefersState
        {
            Refers = 1,//引用状态
            NoRefers = 2,//没有引用
        }

        public static string GetArticleRefersState(int intState)
        {
            string strReturn = string.Empty;
            switch (intState)
            {
                case (int)ArticleRefersState.Refers:
                    strReturn = "引用";
                    break;
                case (int)ArticleRefersState.NoRefers:
                    strReturn = "";
                    break;
            }
            return strReturn;
        }

        #endregion 文章相关

        #region 模板相关

        /// <summary>
        /// 模板类型
        /// </summary>
        public enum TemplateType
        {
            Article = 1,//文章
            Section = 2,//栏目
            WebSite = 3,//站点
            Public = 4,//公共模板
        }

        /// <summary>
        /// 获取模板类型
        /// </summary>
        /// <param name="intType"></param>
        /// <returns></returns>
        public static string GetTemplateType(int intType)
        {
            string strReturn = string.Empty;
            switch (intType)
            {
                case (int)TemplateType.Article:
                    strReturn = "文章";
                    break;
                case (int)TemplateType.Section:
                    strReturn = "栏目";
                    break;
                case (int)TemplateType.WebSite:
                    strReturn = "站点";
                    break;
                case (int)TemplateType.Public:
                    strReturn = "公共模板";
                    break;
            }
            return strReturn;
        }

        public enum TemplateState
        {
            Use = 1,
            NoUse = 2,//不是用
        }

        public static string GetTemplateState(int intState)
        {
            string strReturn = string.Empty;
            switch (intState)
            {
                case (int)TemplateState.Use:
                    strReturn = "启用";
                    break;
                case (int)TemplateState.NoUse:
                    strReturn = "禁用";
                    break;
            }
            return strReturn;
        }

        #endregion 模板相关

        #region JS模板相关

        /// <summary>
        /// 模板类型
        /// </summary>
        public enum JSTemplateType
        {
            FrameWork = 1,//框架
            Custom = 2,//自定义
        }

        /// <summary>
        /// 获取JS模板类型
        /// </summary>
        /// <param name="intType"></param>
        /// <returns></returns>
        public static string GetJSTemplateType(int intType)
        {
            string strReturn = string.Empty;
            switch (intType)
            {
                case (int)JSTemplateType.FrameWork:
                    strReturn = "JS框架";
                    break;
                case (int)JSTemplateType.Custom:
                    strReturn = "自定义JS";
                    break;
            }
            return strReturn;
        }

        public enum JSTemplateState
        {
            Use = 1,
            NoUse = 2,//不是用
        }

        public static string GetJSTemplateState(int intState)
        {
            string strReturn = string.Empty;
            switch (intState)
            {
                case (int)JSTemplateState.Use:
                    strReturn = "启用";
                    break;
                case (int)JSTemplateState.NoUse:
                    strReturn = "禁用";
                    break;
            }
            return strReturn;
        }

        #endregion JS模板相关

        #region 栏目相关

        public enum STDisplay
        {
            Yes = 1,//显示
            No = 2,//不显示
        }

        public enum StateRefer
        {
            Yes = 1,
            No = 0
        }

        public enum STState
        {
            Use = 1,  //使用
            NoUse = 2,  //不使用
        }

        public enum STType
        {
            List = 1,//列表
            Content = 2,//内容
            Dealers = 5,
            Region = 6,
            Issue = 3,//发布类型栏目
        }

        public enum STIssueState
        {
            NoIssue = 0,//未发布
            Issue = 1,//发布
        }
        #endregion 栏目相关

        #region 系统其他

        public enum MessageState
        {
            Reply = 1,//回复
            NoReply = 2,//没有回复
            Issue = 3,
        }

        public static string GetMessageState(int intState)
        {
            string strReturn = string.Empty;
            switch (intState)
            {
                case (int)MessageState.Reply:
                    strReturn = "已回复";
                    break;
                case (int)MessageState.NoReply:
                    strReturn = "未回复";
                    break;
            }
            return strReturn;
        }

        #endregion 系统其他

        #region 站点相关

        public enum WebSiteState
        {
            Use = 1,
            NoUse = 2,
        }

        public enum WebSiteLevel
        {
            Index = 1,
            NoIndex = 0,
        }

        #endregion 站点相关

        #region 后台权限

        public enum UserState
        {
            Disabled = 0,
            Enabled = 1,
        }

        public enum ManagerCompetence
        {
            SysAdmin = 1,
            Designer =2 ,
            Admin = 3,
            UserCanIssueAndClients = 4,
            UserCanIssue=5,
            User = 6,
        }
        #endregion 后台权限

        #region 语言版本相关

        public enum WebSiteLanguage
        {
            China = 0,
            English = 1,
        }

        #endregion 语言版本相关

        #region 注册会员相关

        /// <summary>
        /// 会员类型  根据需要进行扩展
        /// </summary>
        public enum ClientsType
        {
            Normal = 0,
            Normal2 = 1,
        }

        /// <summary>
        /// 会员状态
        /// </summary>
        public enum ClientsState
        {
            Enabled = 0,
            Disabled = 1,
        }

        /// <summary>
        /// 会员性别
        /// </summary>
        public enum ClientsSex
        {
            Male = 0,
            Female = 1,
            Secret=2,
        }

        #endregion 语言版本相关

        #region 网站验证相关

        public enum RetrurnRegistState
        {
            Suecess = 0,//成功
            NoUser = 1,//没有网站用户
            PswError = 2,//密码错误
            NoRegist = 3,//没有注册
        }
        /// <summary>
        /// 网站是否放弃绑定0,未放弃1,放弃
        /// </summary>
        public enum IsDrop
        {
            No = 0,  //未放弃
            Yes = 1,  //放弃
        }
        /// <summary>
        /// 是否试用版0,否1,是
        /// </summary>
        public enum IsTryUse
        {
            No = 0,  //否
            Yes = 1,  //是
        }
        /// <summary>
        /// 是否全款0,否1,是
        /// </summary>
        public enum IsAllMoney
        {
            No = 0,  //否
            Yes = 1,  //是
        }
        #endregion 网站验证相关

        #region 系统配置项

        public enum IssueWebPageChangeHtml
        {
            changetohtml = 1,//changetohtml
        }
        #endregion
    }

    public class Section
    {
        public enum STType
        {
            Normal = 1,	//普通栏目
            Virtual = 2,	//虚拟栏目
        }

        public enum STState
        {
            Canceled = 0,	// 停用
            Used = 1,	// 启用
        }
        public enum STIssueState
        {
            NoIssue = 0,//未发布
            Issue = 1,//发布
        }
        public enum NeedAudit
        {
            No = 0,		// 不需审核
            Yes = 1,		// 需要审核
        }
        public enum RssDefault
        {
            No = 0,			// 默认不是RSS文章
            Yes = 1,		// 默认是RSS文章
        }
        public enum STDisplay
        {
            No = 0,	// 不显示
            Yes = 1,	// 显示
        }
    }
}